<?php
/**
 * ============================================================================
 * 版权所有 2008-2011 多多网络，并保留所有权利。
 * 网站地址: http://soft.duoduo123.com；
 * ----------------------------------------------------------------------------
 * 这不是一个自由软件！您只能在不用于商业目的的前提下对程序代码进行修改和
 * 使用；不允许对程序代码以任何形式任何目的的再发布。
 * ============================================================================
*/
error_reporting(0);
session_start();
include_once 'comm/config.php';
include_once 'comm/msgset.php';
include_once 'comm/Taoapi.php';
include_once 'comm/wjt.php';
include_once 'comm/GetReport.php';
include_once 'comm/checkpostandget.php';

//查找商家数据库
$sql="select * from ".$BIAOTOU."mall order by sort desc limit 0,8";
$rs_mall=mysql_query($sql);

$sql="select * from ".$BIAOTOU."malltype order by sort asc limit 0,7";
$rs_malltype=mysql_query($sql);

$sql="select id,name,fan,catid from ".$BIAOTOU."mall order by sort desc";
$rs_malllist=mysql_query($sql);
$i=0;
while ($row2 = mysql_fetch_array($rs_malllist)){
	$allmalllist[$i]['id']= $row2['id'];
	$allmalllist[$i]['catid']= $row2['catid'];
	$allmalllist[$i]['name']= $row2['name'];
	$allmalllist[$i]['fan']= $row2['fan'];
	$allmalllist[$i]['catid']= $row2['catid'];
	$i++;
}

//幻灯片
$sql="select * from ".$BIAOTOU."slides where hide=0 order by wz asc limit 0,10";
$rs_slides=mysql_query($sql);
$i=0;
while ($row = mysql_fetch_array($rs_slides)){
	$slides_pic[$i]=$row['pic'];
	$slides_url[$i]=$row['url'];
	$slides_title[$i]=$row['title'];
	$i++;
}

//热门店铺
$sql="select * from ".$BIAOTOU."shop order by tuijian desc, addtime desc  limit 0,7";
$rs_shop=mysql_query($sql);

//常见问题
$sql="select * from ".$BIAOTOU."article where cid=3 order by ontop desc,created_date desc limit 0,10";
$rs_article=mysql_query($sql);

//图片资讯
$sql="select * from ".$BIAOTOU."article where pic<>'' and cid>3 order by ontop desc,created_date desc limit 0,2";
$rs_pic_article=mysql_query($sql);

//购物资讯
$sql="select * from ".$BIAOTOU."article where cid>3 order by ontop desc,created_date desc limit 0,10";
$rs_new_article=mysql_query($sql);

//站点公告
$sql="select * from ".$BIAOTOU."article where cid=2 order by ontop desc,created_date desc limit 0,5";
$rs_gg=mysql_query($sql);

//文字商城
$sql="select * from ".$BIAOTOU."mall order by sort desc limit 8,17";
$rs_mall2=mysql_query($sql);

//友情链接
$sql="select * from ".$BIAOTOU."yqlj where leibie=0 order by wz desc";
$rs_yqlj=mysql_query($sql);

//合作伙伴
$sql="select * from ".$BIAOTOU."yqlj where leibie=1 and pic<>'' order by wz desc";
$rs_hzhb=mysql_query($sql);

$Taoapi_Config = Taoapi_Config::Init();
$Taoapi_Config->setCharset('UTF-8');
$Taoapi = new Taoapi;
//热销
$Taoapi->method = 'taobao.taobaoke.items.get';
$Taoapi->fields = 'iid,num_iid,title,nick,pic_url,price,click_url,shop_click_url,volume,commission,commission_rate,commission_num,commission_volume,';
$Taoapi->nick = MYUSERNICK;
$Taoapi->keyword = HOTWORD;
$Taoapi->page_size = '8';
$Taoapi->sort = 'commissionNum_desc';
$Taoapi->outer_code=$_SESSION["dduserid"];
$rexiaoapi= $Taoapi->Send('get','xml')->getArrayData();
$ListHot = $rexiaoapi["taobaoke_items"]["taobaoke_item"]; 

$tag="index";
//引入模版文件
include 'template/'.MOBAN.'/index.tpl.php';
mysql_close($cfg_link);
?>
